package compiler;
import java.util.Vector;
/*
 *
 * CProcedure
 *
 */
class CProcedure extends CSymbol
{
	Vector argList = new Vector();
	int argCount = 0;
	int offset = 0;
	CProcedure(int l, int o)
	{
		super(l); offset = o;
	}

	int GetOffset() { return offset; }

	void AddItem(boolean isVar, CType t)
	{
		argList.addElement(new CArgument(isVar, t));
		argCount++;
	}

	CArgument GetItem(int i)// throws CNoMemberError
	{
		CArgument arg = (CArgument)argList.elementAt(i);
		return arg;
	}

	int GetArgCount() { return argCount; }

	public String toString()
	{
		return "Procedure ()";
	}
}

class CWriteProc extends CSymbol
{
	private boolean writeln;
	CWriteProc(boolean ln)
	{
		super(0); writeln = ln;
	}

	boolean IsWriteln() { return writeln; }
}

class CReadProc extends CSymbol
{
	CReadProc() { super(0); }
}
